import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:xiongan_app_yy/provider/message_provider.dart';

class LeftIconWidget extends StatelessWidget {
  final IconData icon;
  final double isize;
  LeftIconWidget({this.icon, this.isize});

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return GestureDetector(
      child: Icon(
        icon,
        size: isize,
      ),
      onTap: () {
        //返回
        Navigator.pop(context, "back");
        //刷新消息通知
        Provider.of<MessageProvider>(context).getList();
      },
    );
  }
}
